<%= form_for(@product) do |f| %>
  <% if @product.errors.any? %>
    <div class="alert alert-error">
      <h4><%= t('global_form_error') %></h4>
      <%= pluralize(@product.errors.count, t("global_form_error")) %><%= t('global_form_prohibited') %>
      <ul>
      <% @product.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

    <%= f.label :title %><br />
    <%= f.text_field :title, :class => 'input-xxlarge' %>
    
    <%= f.label :description %><br />
    <%= f.text_area :description, :class => 'input-xxlarge' %>
    
    <%= f.label :image_url %><br />
    <%= f.text_field :image_url, :class => 'input-xxlarge' %>
    
    <%= f.label :price %><br />
    <%= f.text_field :price, :class => 'input-xxlarge' %><br />
    
    <%= f.label :promote %><br />
    <%= f.check_box :promote, :class => 'input' %><br />
    
    
    <%= f.label :category_id %><br />
    <%= collection_select(:product, :category_id, Category.all, :id, :name)%><br />
    
    <%= f.submit :class => 'btn' %>
<% end %>
